﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入炒菜或传菜");
            string s = Console.ReadLine();
            Robot a = text(s);
            a.Working();
        }
        public static Robot text(string s)
        {
            Robot robot;
            if (s == "炒菜")
            {
                robot = new CookRobot("炒菜", " 北京烤鸭,四川麻婆豆腐");
                return robot;
            }
            else if (s == "传菜")
            {
                robot = new DeliveryRobot("传菜", 12);
                return robot;
            }
            else
            {
                robot = new CookRobot("炒菜", "四川麻婆豆腐");
                return robot;
            }
        }
    }
}
